var express = require('express');
var app = new express()
var hr = require('./router/hr')
var user = require('./router/user')
var dict = require('./router/dict')

/*cnpm  install cors --save*/
var cors=require('cors');
app.use(cors());

/**
 *  静态资源管理
 * */
app.use('/public',express.static('static')); // /public --- url ; static -- 本地文件夹路径

app.use('/hr',hr);
app.use('/user',user);
app.use('/dict',dict);



var server  =app.listen(3000,'localhost',function () {
    var host = server.address().address;
    var port= server.address().port;

    console.log("the server is running on http:// %s:%s",host,port);
})